//
// doudizhu card list
//
#ifndef CARD_LIST__H
#define CARD_LIST__H

//
//
#include "douservice/dou_card.h"

/*
 * struct card_list
 */
struct card_list;

/*
 * struct card_list pointer
 */
typedef struct card_list* clist;

/*
 * list operations
 */

/*
 * create a list with a null header
 */
clist clist_create( void );

/*
 * delete a card list
 * cl, header of the list
 */
void clist_delete( clist cl );

/*
 * append a dcard 
 * cl, header of the list
 * dd, dou card
 * true if success, false if not
 */
int clist_append( clist cl, dcard dd );


/*
 * find end of clist
 * cl, header of the list
 * return end of clist
 */
clist clist_end( clist cl );


#endif // CARD_LIST__H
